from django.urls import path,re_path
from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView,TokenVerifyView
from users.views import CreateUserViews,RegisterViews,MobileApiView,SmsApiView
urlpatterns = [
    # 获取token
    path('jwt/access/',TokenObtainPairView.as_view()),
    # 刷新touekn
    path('jwt/refresh/',TokenRefreshView.as_view()),
    # 校验token
    path('jwt/verify/',TokenVerifyView.as_view()),
    # 测试视图
    path('createuser/',CreateUserViews.as_view()),

    path('register/',RegisterViews.as_view()),

    # 动态路由转换器 <int:mobile>
    # re_path
    re_path(r'^mobile/(?P<mobile>1[3-9]\d{9})/$', MobileApiView.as_view()),
    # 注册发送验证码
    re_path(r'^sendsms/(?P<mobile>1[3-9]\d{9})/$', SmsApiView.as_view()),

   ]
